let chren = args.form;
chren.forEach(function(item,index,array){
  let id = item.id;
  let pid = item.pid;
	lib.dbUpdate('UPDATE receipt_product SET no_qc_num = IF(receipt_num IS NULL,0,receipt_num),low_quality = IF(receipt_num IS NULL,0,receipt_num),receipt_num_hidden = 1 WHERE id = ? AND del_flag = 0',id); 
  lib.dbUpdate('UPDATE receipt SET all_total_storage = (SELECT SUM(receipt_num) FROM receipt_product WHERE parent_receipt = ? AND del_flag = 0) WHERE id = ? AND del_flag = 0',pid,pid); 
});
1
